package com.ericsson.eritask.Impl;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.ericsson.eritask.dao.UserDAO;
import com.ericsson.eritask.domain.User;

public class TaskImpl {


	public static void main(String []args){

		ApplicationContext context= new ClassPathXmlApplicationContext("spring.xml");
		//	
		//	TaskService taskService = (TaskService) context.getBean("taskService");
		//	 
		//	Task task = new Task();
		//	//task.setTaskId(1);
		//	task.setTaskId(20);
		//	task.setPriority("XXXX");
		//	task.setReminder(false);
		//	task.setStatus("Not completed");
		//
		//	taskService.addTask(task);



//		RoleDAO dao = context.getBean(RoleDAO.class);
//		Role r = new Role();
//
//		//r.setRoleId(1001);
//		r.setRoleName("EMPLOYEE");
//
//		dao.insert(r);
		//
			UserDAO dao = context.getBean(UserDAO.class);
			//dao.getAllUserRoles("e1235");
			//dao.findAll();
			
		//dao.getUserRole("EMPLOYEE","e1122");
				/*User u = new User();
		
				u.setSignum("e1122");
				u.setUserName("User4");
				u.setPassword("User4");*/
		//		
		//		Role r = new Role();
		//		r.setRoleId(1000);
		//		r.setRoleName("EMPLOYEE");
		//dao.insert(u);
		//		//dao.findAll();
		//		
		//		dao.addUserRole();
		//		
		//dao.addUserRole(u, r);

		//UserRole  ur = new UserRole();
		//List<UserRole> userRole = new ArrayList<UserRole>();
		//dao.add( );
		//dao.insert(r);
		//System.out.println();

	}


}
